using com.byt.suce.db.dao;
using System;
using System.Data;
using System.Data.Common;
using com.byt.webcore;
using System.Collections.Generic;
using MYLSOFT.JsonSimple;
using System.Data.SqlClient;

namespace com.byt.suce.db.mapper {

    public class PkgSolicitud : AbstractDataAccessObject , IPkgSolicitud {

        public PkgSolicitud() {
        }

        public PkgSolicitud.AdjDeleteParam adjDelete(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.AdjDeleteParam param = newAdjDeleteParam(map);
            adjDelete(conn, param);
            return param;
        }

        public PkgSolicitud.AdjDeleteParam adjDelete(Connection conn, JSONObject json) {
            PkgSolicitud.AdjDeleteParam param = newAdjDeleteParam(json);
            adjDelete(conn, param);
            return param;
        }

        public PkgSolicitud.AdjDeleteParam adjDelete(Connection conn) {
            PkgSolicitud.AdjDeleteParam param = newAdjDeleteParam();
            adjDelete(conn, param);
            return param;
        }

        public void adjDelete(Connection conn, PkgSolicitud.AdjDeleteParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_adj_delete";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // idadjunto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idadjunto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idadjunto == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idadjunto;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.AdjGetlistParam adjGetlist(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.AdjGetlistParam param = newAdjGetlistParam(map);
            adjGetlist(conn, param);
            return param;
        }

        public PkgSolicitud.AdjGetlistParam adjGetlist(Connection conn, JSONObject json) {
            PkgSolicitud.AdjGetlistParam param = newAdjGetlistParam(json);
            adjGetlist(conn, param);
            return param;
        }

        public PkgSolicitud.AdjGetlistParam adjGetlist(Connection conn) {
            PkgSolicitud.AdjGetlistParam param = newAdjGetlistParam();
            adjGetlist(conn, param);
            return param;
        }

        public void adjGetlist(Connection conn, PkgSolicitud.AdjGetlistParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_adj_getlist";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // cur_out
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_out";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurOut = (DbDataReader)ds.Tables[0].CreateDataReader();
        }

        public PkgSolicitud.AdjInsertParam adjInsert(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.AdjInsertParam param = newAdjInsertParam(map);
            adjInsert(conn, param);
            return param;
        }

        public PkgSolicitud.AdjInsertParam adjInsert(Connection conn, JSONObject json) {
            PkgSolicitud.AdjInsertParam param = newAdjInsertParam(json);
            adjInsert(conn, param);
            return param;
        }

        public PkgSolicitud.AdjInsertParam adjInsert(Connection conn) {
            PkgSolicitud.AdjInsertParam param = newAdjInsertParam();
            adjInsert(conn, param);
            return param;
        }

        public void adjInsert(Connection conn, PkgSolicitud.AdjInsertParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_adj_insert";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // filename1
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@filename1";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 200;
            if (string.IsNullOrEmpty(param.Filename1))
                par.Value = DBNull.Value;
            else
                par.Value = param.Filename1;
            // filename2
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@filename2";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 200;
            if (string.IsNullOrEmpty(param.Filename2))
                par.Value = DBNull.Value;
            else
                par.Value = param.Filename2;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.GetbyidParam getbyid(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.GetbyidParam param = newGetbyidParam(map);
            getbyid(conn, param);
            return param;
        }

        public PkgSolicitud.GetbyidParam getbyid(Connection conn, JSONObject json) {
            PkgSolicitud.GetbyidParam param = newGetbyidParam(json);
            getbyid(conn, param);
            return param;
        }

        public PkgSolicitud.GetbyidParam getbyid(Connection conn) {
            PkgSolicitud.GetbyidParam param = newGetbyidParam();
            getbyid(conn, param);
            return param;
        }

        public void getbyid(Connection conn, PkgSolicitud.GetbyidParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_getbyid";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // cur_out
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_out";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_producto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_producto";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_adjunto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_adjunto";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_subsanaciones
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_subsanaciones";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_comprobantes
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_comprobantes";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_deuda
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_deuda";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_adj
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_adj";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            // cur_laboratorio
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_laboratorio";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            //adicional para DGS002
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_dgs002";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurOut = (DbDataReader)ds.Tables[0].CreateDataReader();
            param.CurProducto = (DbDataReader)ds.Tables[1].CreateDataReader();
            param.CurAdjunto = (DbDataReader)ds.Tables[2].CreateDataReader();
            param.CurSubsanaciones = (DbDataReader)ds.Tables[3].CreateDataReader();
            param.CurComprobantes = (DbDataReader)ds.Tables[4].CreateDataReader();
            param.CurDeuda = (DbDataReader)ds.Tables[5].CreateDataReader();
            param.CurAdj = (DbDataReader)ds.Tables[6].CreateDataReader();
            param.CurLaboratorio = (DbDataReader)ds.Tables[7].CreateDataReader();
            param.CurDGS002 = (DbDataReader)ds.Tables[8].CreateDataReader();
        }

        public PkgSolicitud.GetcompareParam getcompare(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.GetcompareParam param = newGetcompareParam(map);
            getcompare(conn, param);
            return param;
        }

        public PkgSolicitud.GetcompareParam getcompare(Connection conn, JSONObject json) {
            PkgSolicitud.GetcompareParam param = newGetcompareParam(json);
            getcompare(conn, param);
            return param;
        }

        public PkgSolicitud.GetcompareParam getcompare(Connection conn) {
            PkgSolicitud.GetcompareParam param = newGetcompareParam();
            getcompare(conn, param);
            return param;
        }

        public void getcompare(Connection conn, PkgSolicitud.GetcompareParam param) {
            
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_getCompare";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // cur_suceact
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_suceact";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_suceant
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_suceant";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_prodsuceact
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_prodsuceact";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_prodsuceant
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_prodsuceant";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            // cur_adjuntoact
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_adjuntoact";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;


            // cur_adjuntoant
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_adjuntoant";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurSuceact = (DbDataReader)ds.Tables[0].CreateDataReader();
            param.CurSuceant = (DbDataReader)ds.Tables[1].CreateDataReader();
            param.CurProdsuceact = (DbDataReader)ds.Tables[2].CreateDataReader();
            param.CurProdsuceant = (DbDataReader)ds.Tables[3].CreateDataReader();

            param.CurAdjuntoact = (DbDataReader)ds.Tables[4].CreateDataReader();
            param.CurAdjuntoant = (DbDataReader)ds.Tables[5].CreateDataReader();
        }


        public PkgSolicitud.GetcompareintegradoParam getcompareintegrado(Connection conn, Dictionary<string, string> map)
        {
            PkgSolicitud.GetcompareintegradoParam param = newGetcompareintegradoParam(map);
            getcompareintegrado(conn, param);
            return param;
        }

        public PkgSolicitud.GetcompareintegradoParam getcompareintegrado(Connection conn, JSONObject json)
        {
            PkgSolicitud.GetcompareintegradoParam param = newGetcompareintegradoParam(json);
            getcompareintegrado(conn, param);
            return param;
        }

        public PkgSolicitud.GetcompareintegradoParam getcompareintegrado(Connection conn)
        {
            PkgSolicitud.GetcompareintegradoParam param = newGetcompareintegradoParam();
            getcompareintegrado(conn, param);
            return param;
        }

        public void getcompareintegrado(Connection conn, PkgSolicitud.GetcompareintegradoParam param)
        {

            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_getCompare_integrado";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // cur_suceact
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_suceact";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_suceant
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_suceant";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_prodsuceact
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_prodsuceact";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_prodsuceant
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_prodsuceant";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurSuceact = (DbDataReader)ds.Tables[0].CreateDataReader();
            param.CurSuceant = (DbDataReader)ds.Tables[1].CreateDataReader();
            param.CurProdsuceact = (DbDataReader)ds.Tables[2].CreateDataReader();
            param.CurProdsuceant = (DbDataReader)ds.Tables[3].CreateDataReader();

        }



        public PkgSolicitud.GetdrByidParam getdrByid(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.GetdrByidParam param = newGetdrByidParam(map);
            getdrByid(conn, param);
            return param;
        }

        public PkgSolicitud.GetdrByidParam getdrByid(Connection conn, JSONObject json) {
            PkgSolicitud.GetdrByidParam param = newGetdrByidParam(json);
            getdrByid(conn, param);
            return param;
        }

        public PkgSolicitud.GetdrByidParam getdrByid(Connection conn) {
            PkgSolicitud.GetdrByidParam param = newGetdrByidParam();
            getdrByid(conn, param);
            return param;
        }

        public void getdrByid(Connection conn, PkgSolicitud.GetdrByidParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_getdr_byid";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // cur_out
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_out";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurOut = (DbDataReader)ds.Tables[0].CreateDataReader();
        }

        public PkgSolicitud.ObsadjEditParam obsadjEdit(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ObsadjEditParam param = newObsadjEditParam(map);
            obsadjEdit(conn, param);
            return param;
        }

        public PkgSolicitud.ObsadjEditParam obsadjEdit(Connection conn, JSONObject json) {
            PkgSolicitud.ObsadjEditParam param = newObsadjEditParam(json);
            obsadjEdit(conn, param);
            return param;
        }

        public PkgSolicitud.ObsadjEditParam obsadjEdit(Connection conn) {
            PkgSolicitud.ObsadjEditParam param = newObsadjEditParam();
            obsadjEdit(conn, param);
            return param;
        }

        public void obsadjEdit(Connection conn, PkgSolicitud.ObsadjEditParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_obsadj_edit";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // obs
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@obs";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Obs))
                par.Value = DBNull.Value;
            else
                par.Value = param.Obs;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.ProdDuplicarParam prodDuplicar(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ProdDuplicarParam param = newProdDuplicarParam(map);
            prodDuplicar(conn, param);
            return param;
        }

        public PkgSolicitud.ProdDuplicarParam prodDuplicar(Connection conn, JSONObject json) {
            PkgSolicitud.ProdDuplicarParam param = newProdDuplicarParam(json);
            prodDuplicar(conn, param);
            return param;
        }

        public PkgSolicitud.ProdDuplicarParam prodDuplicar(Connection conn) {
            PkgSolicitud.ProdDuplicarParam param = newProdDuplicarParam();
            prodDuplicar(conn, param);
            return param;
        }

        public void prodDuplicar(Connection conn, PkgSolicitud.ProdDuplicarParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_prod_duplicar";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // idproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idproducto == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idproducto;
            // idpersonal
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idpersonal";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idpersonal == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idpersonal;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.ProdEditParam prodEdit(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ProdEditParam param = newProdEditParam(map);
            prodEdit(conn, param);
            return param;
        }

        public PkgSolicitud.ProdEditParam prodEdit(Connection conn, JSONObject json) {
            PkgSolicitud.ProdEditParam param = newProdEditParam(json);
            prodEdit(conn, param);
            return param;
        }

        public PkgSolicitud.ProdEditParam prodEdit(Connection conn) {
            PkgSolicitud.ProdEditParam param = newProdEditParam();
            prodEdit(conn, param);
            return param;
        }

        public void prodEdit(Connection conn, PkgSolicitud.ProdEditParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_prod_edit";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // idproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idproducto == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idproducto;
            // nombproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@nombproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 2000;
            if (string.IsNullOrEmpty(param.Nombproducto))
                par.Value = DBNull.Value;
            else
                par.Value = param.Nombproducto;
            // marcproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@marcproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 300;
            if (string.IsNullOrEmpty(param.Marcproducto))
                par.Value = DBNull.Value;
            else
                par.Value = param.Marcproducto;
            // idclasificacion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idclasificacion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idclasificacion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idclasificacion;
            // codiclas
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@codiclas";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 10;
            if (string.IsNullOrEmpty(param.Codiclas))
                par.Value = DBNull.Value;
            else
                par.Value = param.Codiclas;
            // codigrupo
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@codigrupo";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 10;
            if (string.IsNullOrEmpty(param.Codigrupo))
                par.Value = DBNull.Value;
            else
                par.Value = param.Codigrupo;
            // composicion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@composicion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Composicion))
                par.Value = DBNull.Value;
            else
                par.Value = param.Composicion;
            // aditivo
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@aditivo";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Aditivo))
                par.Value = DBNull.Value;
            else
                par.Value = param.Aditivo;
            // envase
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@envase";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Envase))
                par.Value = DBNull.Value;
            else
                par.Value = param.Envase;
            // idpersonal
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idpersonal";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idpersonal == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idpersonal;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.ProdGetbyidParam prodGetbyid(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ProdGetbyidParam param = newProdGetbyidParam(map);
            prodGetbyid(conn, param);
            return param;
        }

        public PkgSolicitud.ProdGetbyidParam prodGetbyid(Connection conn, JSONObject json) {
            PkgSolicitud.ProdGetbyidParam param = newProdGetbyidParam(json);
            prodGetbyid(conn, param);
            return param;
        }

        public PkgSolicitud.ProdGetbyidParam prodGetbyid(Connection conn) {
            PkgSolicitud.ProdGetbyidParam param = newProdGetbyidParam();
            prodGetbyid(conn, param);
            return param;
        }

        public void prodGetbyid(Connection conn, PkgSolicitud.ProdGetbyidParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_prod_getbyid";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // idproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idproducto == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idproducto;
            // cur_form
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_form";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_componente
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_componente";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_aditivo
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_aditivo";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_envase
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_envase";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurForm = (DbDataReader)ds.Tables[0].CreateDataReader();
            param.CurComponente = (DbDataReader)ds.Tables[1].CreateDataReader();
            param.CurAditivo = (DbDataReader)ds.Tables[2].CreateDataReader();
            param.CurEnvase = (DbDataReader)ds.Tables[3].CreateDataReader();
        }

        public PkgSolicitud.ProductoGetdetalleParam productoGetdetalle(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ProductoGetdetalleParam param = newProductoGetdetalleParam(map);
            productoGetdetalle(conn, param);
            return param;
        }

        public PkgSolicitud.ProductoGetdetalleParam productoGetdetalle(Connection conn, JSONObject json) {
            PkgSolicitud.ProductoGetdetalleParam param = newProductoGetdetalleParam(json);
            productoGetdetalle(conn, param);
            return param;
        }

        public PkgSolicitud.ProductoGetdetalleParam productoGetdetalle(Connection conn) {
            PkgSolicitud.ProductoGetdetalleParam param = newProductoGetdetalleParam();
            productoGetdetalle(conn, param);
            return param;
        }

        public void productoGetdetalle(Connection conn, PkgSolicitud.ProductoGetdetalleParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_producto_getdetalle";
            DbParameter par = null;
            // idproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idproducto == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idproducto;
            // cur_composicion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_composicion";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_envase
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_envase";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            // cur_aditivo
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_aditivo";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            //modificado por CESAR BOCANEGRA
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_lote";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;

            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurComposicion = (DbDataReader)ds.Tables[0].CreateDataReader();
            param.CurEnvase = (DbDataReader)ds.Tables[1].CreateDataReader();
            param.CurAditivo = (DbDataReader)ds.Tables[2].CreateDataReader();
            param.CurLote = (DbDataReader)ds.Tables[3].CreateDataReader();
        }

        public PkgSolicitud.ProductoUpdateParam productoUpdate(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ProductoUpdateParam param = newProductoUpdateParam(map);
            productoUpdate(conn, param);
            return param;
        }

        public PkgSolicitud.ProductoUpdateParam productoUpdate(Connection conn, JSONObject json) {
            PkgSolicitud.ProductoUpdateParam param = newProductoUpdateParam(json);
            productoUpdate(conn, param);
            return param;
        }

        public PkgSolicitud.ProductoUpdateParam productoUpdate(Connection conn) {
            PkgSolicitud.ProductoUpdateParam param = newProductoUpdateParam();
            productoUpdate(conn, param);
            return param;
        }

        public void productoUpdate(Connection conn, PkgSolicitud.ProductoUpdateParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_producto_update";
            DbParameter par = null;
            // idproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idproducto == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idproducto;
            // idclasificacion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idclasificacion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idclasificacion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idclasificacion;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.ProductoUpdateEstadoParam productoUpdateEstado(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.ProductoUpdateEstadoParam param = newProductoUpdateEstadoParam(map);
            productoUpdateEstado(conn, param);
            return param;
        }

        public PkgSolicitud.ProductoUpdateEstadoParam productoUpdateEstado(Connection conn, JSONObject json) {
            PkgSolicitud.ProductoUpdateEstadoParam param = newProductoUpdateEstadoParam(json);
            productoUpdateEstado(conn, param);
            return param;
        }

        public PkgSolicitud.ProductoUpdateEstadoParam productoUpdateEstado(Connection conn) {
            PkgSolicitud.ProductoUpdateEstadoParam param = newProductoUpdateEstadoParam();
            productoUpdateEstado(conn, param);
            return param;
        }

        public void productoUpdateEstado(Connection conn, PkgSolicitud.ProductoUpdateEstadoParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_producto_update_estado";
            DbParameter par = null;
            // idproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Idproducto))
                par.Value = DBNull.Value;
            else
                par.Value = param.Idproducto;
            // estadoproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@estadoproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 1;
            if (string.IsNullOrEmpty(param.Estadoproducto))
                par.Value = DBNull.Value;
            else
                par.Value = param.Estadoproducto;
            // obsproducto
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@obsproducto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Obsproducto))
                par.Value = DBNull.Value;
            else
                par.Value = param.Obsproducto;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.SubsanaGetbyidParam subsanaGetbyid(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.SubsanaGetbyidParam param = newSubsanaGetbyidParam(map);
            subsanaGetbyid(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaGetbyidParam subsanaGetbyid(Connection conn, JSONObject json) {
            PkgSolicitud.SubsanaGetbyidParam param = newSubsanaGetbyidParam(json);
            subsanaGetbyid(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaGetbyidParam subsanaGetbyid(Connection conn) {
            PkgSolicitud.SubsanaGetbyidParam param = newSubsanaGetbyidParam();
            subsanaGetbyid(conn, param);
            return param;
        }

        public void subsanaGetbyid(Connection conn, PkgSolicitud.SubsanaGetbyidParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_subsana_getbyid";
            DbParameter par = null;
            // idsubsanacion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsubsanacion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsubsanacion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsubsanacion;
            // cur_subsanacion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@cur_subsanacion";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Object;
            par.Value = DBNull.Value;
            DataSet ds = new DataSet();
            DataAdapter da = new SqlDataAdapter((SqlCommand)cmd);
            da.Fill(ds);
            param.CurSubsanacion = (DbDataReader)ds.Tables[0].CreateDataReader();
        }

        public PkgSolicitud.SubsanaGetlistParam subsanaGetlist(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.SubsanaGetlistParam param = newSubsanaGetlistParam(map);
            subsanaGetlist(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaGetlistParam subsanaGetlist(Connection conn, JSONObject json) {
            PkgSolicitud.SubsanaGetlistParam param = newSubsanaGetlistParam(json);
            subsanaGetlist(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaGetlistParam subsanaGetlist(Connection conn) {
            PkgSolicitud.SubsanaGetlistParam param = newSubsanaGetlistParam();
            subsanaGetlist(conn, param);
            return param;
        }

        public void subsanaGetlist(Connection conn, PkgSolicitud.SubsanaGetlistParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_subsana_getlist";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            cmd.ExecuteNonQuery();
        }

        public PkgSolicitud.SubsanaGetmessageParam subsanaGetmessage(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.SubsanaGetmessageParam param = newSubsanaGetmessageParam(map);
            subsanaGetmessage(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaGetmessageParam subsanaGetmessage(Connection conn, JSONObject json) {
            PkgSolicitud.SubsanaGetmessageParam param = newSubsanaGetmessageParam(json);
            subsanaGetmessage(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaGetmessageParam subsanaGetmessage(Connection conn) {
            PkgSolicitud.SubsanaGetmessageParam param = newSubsanaGetmessageParam();
            subsanaGetmessage(conn, param);
            return param;
        }

        public void subsanaGetmessage(Connection conn, PkgSolicitud.SubsanaGetmessageParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_subsana_getmessage";
            DbParameter par = null;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // mensaje
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@mensaje";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Mensaje))
                par.Value = DBNull.Value;
            else
                par.Value = param.Mensaje;
            cmd.ExecuteNonQuery();
            if(DBNull.Value.Equals(cmd.Parameters["@mensaje"].Value))
                param.Mensaje = null;
            else
                param.Mensaje = (string)cmd.Parameters["@mensaje"].Value;
        }

        public PkgSolicitud.SubsanaUpdateParam subsanaUpdate(Connection conn, Dictionary<string, string> map) {
            PkgSolicitud.SubsanaUpdateParam param = newSubsanaUpdateParam(map);
            subsanaUpdate(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaUpdateParam subsanaUpdate(Connection conn, JSONObject json) {
            PkgSolicitud.SubsanaUpdateParam param = newSubsanaUpdateParam(json);
            subsanaUpdate(conn, param);
            return param;
        }

        public PkgSolicitud.SubsanaUpdateParam subsanaUpdate(Connection conn) {
            PkgSolicitud.SubsanaUpdateParam param = newSubsanaUpdateParam();
            subsanaUpdate(conn, param);
            return param;
        }

        public void subsanaUpdate(Connection conn, PkgSolicitud.SubsanaUpdateParam param) {
            DbCommand cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].SOL_subsana_update";
            DbParameter par = null;
            // idsubsanacion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsubsanacion";
            par.Direction = ParameterDirection.InputOutput;
            par.DbType = DbType.Int32;
            if (param.Idsubsanacion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsubsanacion;
            // idsolicitud
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idsolicitud";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idsolicitud == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idsolicitud;
            // idversion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idversion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Idversion == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Idversion;
            // idactividad
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@idactividad";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 20;
            if (string.IsNullOrEmpty(param.Idactividad))
                par.Value = DBNull.Value;
            else
                par.Value = param.Idactividad;
            // rutaadj
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@rutaadj";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 100;
            if (string.IsNullOrEmpty(param.Rutaadj))
                par.Value = DBNull.Value;
            else
                par.Value = param.Rutaadj;
            // monttasa
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@monttasa";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Decimal;
            if (param.Monttasa == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Monttasa;
            // plazo
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@plazo";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.Int32;
            if (param.Plazo == null)
                par.Value = DBNull.Value;
            else
                par.Value = param.Plazo;
            // descsubsanacion
            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@descsubsanacion";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 4000;
            if (string.IsNullOrEmpty(param.Descsubsanacion))
                par.Value = DBNull.Value;
            else
                par.Value = param.Descsubsanacion;

            par = cmd.CreateParameter();
            cmd.Parameters.Add(par);
            par.ParameterName = "@asunto";
            par.Direction = ParameterDirection.Input;
            par.DbType = DbType.String;
            par.Size = 200;
            if (string.IsNullOrEmpty(param.Asunto))
                par.Value = DBNull.Value;
            else
                par.Value = param.Asunto;

            cmd.ExecuteNonQuery();
            if(DBNull.Value.Equals(cmd.Parameters["@idsubsanacion"].Value))
                param.Idsubsanacion = null;
            else
                param.Idsubsanacion = (int?)cmd.Parameters["@idsubsanacion"].Value;
        }

        public PkgSolicitud.AdjDeleteParam newAdjDeleteParam() {
            return new AdjDeleteParam();
        }

        public PkgSolicitud.AdjDeleteParam newAdjDeleteParam(Dictionary<string, string> map) {
            return new AdjDeleteParam(map);
        }

        public PkgSolicitud.AdjDeleteParam newAdjDeleteParam(JSONObject json) {
            return new AdjDeleteParam(json);
        }

        public PkgSolicitud.AdjGetlistParam newAdjGetlistParam() {
            return new AdjGetlistParam();
        }

        public PkgSolicitud.AdjGetlistParam newAdjGetlistParam(Dictionary<string, string> map) {
            return new AdjGetlistParam(map);
        }

        public PkgSolicitud.AdjGetlistParam newAdjGetlistParam(JSONObject json) {
            return new AdjGetlistParam(json);
        }

        public PkgSolicitud.AdjInsertParam newAdjInsertParam() {
            return new AdjInsertParam();
        }

        public PkgSolicitud.AdjInsertParam newAdjInsertParam(Dictionary<string, string> map) {
            return new AdjInsertParam(map);
        }

        public PkgSolicitud.AdjInsertParam newAdjInsertParam(JSONObject json) {
            return new AdjInsertParam(json);
        }

        public PkgSolicitud.GetbyidParam newGetbyidParam() {
            return new GetbyidParam();
        }

        public PkgSolicitud.GetbyidParam newGetbyidParam(Dictionary<string, string> map) {
            return new GetbyidParam(map);
        }

        public PkgSolicitud.GetbyidParam newGetbyidParam(JSONObject json) {
            return new GetbyidParam(json);
        }

        public PkgSolicitud.GetcompareParam newGetcompareParam() {
            return new GetcompareParam();
        }

        public PkgSolicitud.GetcompareParam newGetcompareParam(Dictionary<string, string> map) {
            return new GetcompareParam(map);
        }

        public PkgSolicitud.GetcompareParam newGetcompareParam(JSONObject json) {
            return new GetcompareParam(json);
        }




        public PkgSolicitud.GetcompareintegradoParam newGetcompareintegradoParam()
        {
            return new GetcompareintegradoParam();
        }

        public PkgSolicitud.GetcompareintegradoParam newGetcompareintegradoParam(Dictionary<string, string> map)
        {
            return new GetcompareintegradoParam(map);
        }

        public PkgSolicitud.GetcompareintegradoParam newGetcompareintegradoParam(JSONObject json)
        {
            return new GetcompareintegradoParam(json);
        }




        public PkgSolicitud.GetdrByidParam newGetdrByidParam() {
            return new GetdrByidParam();
        }

        public PkgSolicitud.GetdrByidParam newGetdrByidParam(Dictionary<string, string> map) {
            return new GetdrByidParam(map);
        }

        public PkgSolicitud.GetdrByidParam newGetdrByidParam(JSONObject json) {
            return new GetdrByidParam(json);
        }

        public PkgSolicitud.ObsadjEditParam newObsadjEditParam() {
            return new ObsadjEditParam();
        }

        public PkgSolicitud.ObsadjEditParam newObsadjEditParam(Dictionary<string, string> map) {
            return new ObsadjEditParam(map);
        }

        public PkgSolicitud.ObsadjEditParam newObsadjEditParam(JSONObject json) {
            return new ObsadjEditParam(json);
        }

        public PkgSolicitud.ProdDuplicarParam newProdDuplicarParam() {
            return new ProdDuplicarParam();
        }

        public PkgSolicitud.ProdDuplicarParam newProdDuplicarParam(Dictionary<string, string> map) {
            return new ProdDuplicarParam(map);
        }

        public PkgSolicitud.ProdDuplicarParam newProdDuplicarParam(JSONObject json) {
            return new ProdDuplicarParam(json);
        }

        public PkgSolicitud.ProdEditParam newProdEditParam() {
            return new ProdEditParam();
        }

        public PkgSolicitud.ProdEditParam newProdEditParam(Dictionary<string, string> map) {
            return new ProdEditParam(map);
        }

        public PkgSolicitud.ProdEditParam newProdEditParam(JSONObject json) {
            return new ProdEditParam(json);
        }

        public PkgSolicitud.ProdGetbyidParam newProdGetbyidParam() {
            return new ProdGetbyidParam();
        }

        public PkgSolicitud.ProdGetbyidParam newProdGetbyidParam(Dictionary<string, string> map) {
            return new ProdGetbyidParam(map);
        }

        public PkgSolicitud.ProdGetbyidParam newProdGetbyidParam(JSONObject json) {
            return new ProdGetbyidParam(json);
        }

        public PkgSolicitud.ProductoGetdetalleParam newProductoGetdetalleParam() {
            return new ProductoGetdetalleParam();
        }

        public PkgSolicitud.ProductoGetdetalleParam newProductoGetdetalleParam(Dictionary<string, string> map) {
            return new ProductoGetdetalleParam(map);
        }

        public PkgSolicitud.ProductoGetdetalleParam newProductoGetdetalleParam(JSONObject json) {
            return new ProductoGetdetalleParam(json);
        }

        public PkgSolicitud.ProductoUpdateParam newProductoUpdateParam() {
            return new ProductoUpdateParam();
        }

        public PkgSolicitud.ProductoUpdateParam newProductoUpdateParam(Dictionary<string, string> map) {
            return new ProductoUpdateParam(map);
        }

        public PkgSolicitud.ProductoUpdateParam newProductoUpdateParam(JSONObject json) {
            return new ProductoUpdateParam(json);
        }

        public PkgSolicitud.ProductoUpdateEstadoParam newProductoUpdateEstadoParam() {
            return new ProductoUpdateEstadoParam();
        }

        public PkgSolicitud.ProductoUpdateEstadoParam newProductoUpdateEstadoParam(Dictionary<string, string> map) {
            return new ProductoUpdateEstadoParam(map);
        }

        public PkgSolicitud.ProductoUpdateEstadoParam newProductoUpdateEstadoParam(JSONObject json) {
            return new ProductoUpdateEstadoParam(json);
        }

        public PkgSolicitud.SubsanaGetbyidParam newSubsanaGetbyidParam() {
            return new SubsanaGetbyidParam();
        }

        public PkgSolicitud.SubsanaGetbyidParam newSubsanaGetbyidParam(Dictionary<string, string> map) {
            return new SubsanaGetbyidParam(map);
        }

        public PkgSolicitud.SubsanaGetbyidParam newSubsanaGetbyidParam(JSONObject json) {
            return new SubsanaGetbyidParam(json);
        }

        public PkgSolicitud.SubsanaGetlistParam newSubsanaGetlistParam() {
            return new SubsanaGetlistParam();
        }

        public PkgSolicitud.SubsanaGetlistParam newSubsanaGetlistParam(Dictionary<string, string> map) {
            return new SubsanaGetlistParam(map);
        }

        public PkgSolicitud.SubsanaGetlistParam newSubsanaGetlistParam(JSONObject json) {
            return new SubsanaGetlistParam(json);
        }

        public PkgSolicitud.SubsanaGetmessageParam newSubsanaGetmessageParam() {
            return new SubsanaGetmessageParam();
        }

        public PkgSolicitud.SubsanaGetmessageParam newSubsanaGetmessageParam(Dictionary<string, string> map) {
            return new SubsanaGetmessageParam(map);
        }

        public PkgSolicitud.SubsanaGetmessageParam newSubsanaGetmessageParam(JSONObject json) {
            return new SubsanaGetmessageParam(json);
        }

        public PkgSolicitud.SubsanaUpdateParam newSubsanaUpdateParam() {
            return new SubsanaUpdateParam();
        }

        public PkgSolicitud.SubsanaUpdateParam newSubsanaUpdateParam(Dictionary<string, string> map) {
            return new SubsanaUpdateParam(map);
        }

        public PkgSolicitud.SubsanaUpdateParam newSubsanaUpdateParam(JSONObject json) {
            return new SubsanaUpdateParam(json);
        }

        public class AdjDeleteParam {

            private int? idsolicitud;
            private int? idversion;
            private int? idadjunto;

            public AdjDeleteParam() {
            }

            public AdjDeleteParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public AdjDeleteParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public int? Idadjunto {
                get { return idadjunto; }
                set { this.idadjunto = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class AdjGetlistParam {

            private int? idsolicitud;
            private int? idversion;
            private DbDataReader curOut;

            public AdjGetlistParam() {
            }

            public AdjGetlistParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public AdjGetlistParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public DbDataReader CurOut {
                get { return curOut; }
                set { this.curOut = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class AdjInsertParam {

            private int? idsolicitud;
            private int? idversion;
            private string filename1;
            private string filename2;

            public AdjInsertParam() {
            }

            public AdjInsertParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public AdjInsertParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public string Filename1 {
                get { return filename1; }
                set { this.filename1 = value; }
            }

            public string Filename2 {
                get { return filename2; }
                set { this.filename2 = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class GetbyidParam {

            private int? idsolicitud;
            private int? idversion;
            private DbDataReader curOut;
            private DbDataReader curProducto;
            private DbDataReader curAdjunto;
            private DbDataReader curSubsanaciones;
            private DbDataReader curComprobantes;
            private DbDataReader curDeuda;
            private DbDataReader curAdj;
            private DbDataReader curLaboratorio;
            private DbDataReader curDGS002;//agregado por Cesar Bocanegra

 

            public GetbyidParam() {
            }

            public GetbyidParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public GetbyidParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public DbDataReader CurOut {
                get { return curOut; }
                set { this.curOut = value; }
            }

            public DbDataReader CurProducto {
                get { return curProducto; }
                set { this.curProducto = value; }
            }

            public DbDataReader CurAdjunto {
                get { return curAdjunto; }
                set { this.curAdjunto = value; }
            }

            public DbDataReader CurSubsanaciones {
                get { return curSubsanaciones; }
                set { this.curSubsanaciones = value; }
            }

            public DbDataReader CurComprobantes {
                get { return curComprobantes; }
                set { this.curComprobantes = value; }
            }

            public DbDataReader CurDeuda {
                get { return curDeuda; }
                set { this.curDeuda = value; }
            }

            public DbDataReader CurAdj {
                get { return curAdj; }
                set { this.curAdj = value; }
            }

            public DbDataReader CurLaboratorio
            {
                get { return curLaboratorio; }
                set { this.curLaboratorio = value; }
            }

            public DbDataReader CurDGS002
            {
                get { return curDGS002; }
                set { curDGS002 = value; }
            }//agregado por Cesar Bocanegra

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class GetcompareParam {

            private int? idsolicitud;
            private int? idversion;
            private string formato;

            private DbDataReader curSuceact;
            private DbDataReader curSuceant;
            private DbDataReader curProdsuceact;
            private DbDataReader curProdsuceant;
            
            private DbDataReader curAdjuntoact;
            private DbDataReader curAdjuntoant;


            public GetcompareParam() {
            }

            public GetcompareParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public GetcompareParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public string Formato
            {
                get { return formato; }
                set { formato = value; }
            }

            public DbDataReader CurSuceact {
                get { return curSuceact; }
                set { this.curSuceact = value; }
            }

            public DbDataReader CurSuceant {
                get { return curSuceant; }
                set { this.curSuceant = value; }
            }

            public DbDataReader CurProdsuceact {
                get { return curProdsuceact; }
                set { this.curProdsuceact = value; }
            }

            public DbDataReader CurProdsuceant {
                get { return curProdsuceant; }
                set { this.curProdsuceant = value; }
            }

            public DbDataReader CurAdjuntoact
            {
                get { return curAdjuntoact; }
                set { this.curAdjuntoact = value; }
            }

            public DbDataReader CurAdjuntoant
            {
                get { return curAdjuntoant; }
                set { this.curAdjuntoant = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }



        public class GetcompareintegradoParam
        {

            private int? idsolicitud;
            private int? idversion;
            //private string formato;

            private DbDataReader curSuceact;
            private DbDataReader curSuceant;
            private DbDataReader curProdsuceact;
            private DbDataReader curProdsuceant;

            private DbDataReader curAdjuntoact;
            private DbDataReader curAdjuntoant;


            public GetcompareintegradoParam()
            {
            }

            public GetcompareintegradoParam(Dictionary<string, string> map)
            {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public GetcompareintegradoParam(JSONObject json)
            {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud
            {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion
            {
                get { return idversion; }
                set { this.idversion = value; }
            }
            /*
            public string Formato
            {
                get { return formato; }
                set { formato = value; }
            }
            */
            public DbDataReader CurSuceact
            {
                get { return curSuceact; }
                set { this.curSuceact = value; }
            }

            public DbDataReader CurSuceant
            {
                get { return curSuceant; }
                set { this.curSuceant = value; }
            }

            public DbDataReader CurProdsuceact
            {
                get { return curProdsuceact; }
                set { this.curProdsuceact = value; }
            }

            public DbDataReader CurProdsuceant
            {
                get { return curProdsuceant; }
                set { this.curProdsuceant = value; }
            }

            public DbDataReader CurAdjuntoact
            {
                get { return curAdjuntoact; }
                set { this.curAdjuntoact = value; }
            }

            public DbDataReader CurAdjuntoant
            {
                get { return curAdjuntoant; }
                set { this.curAdjuntoant = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map)
            {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json)
            {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }




        public class GetdrByidParam {

            private int? idsolicitud;
            private int? idversion;
            private DbDataReader curOut;

            public GetdrByidParam() {
            }

            public GetdrByidParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public GetdrByidParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public DbDataReader CurOut {
                get { return curOut; }
                set { this.curOut = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ObsadjEditParam {

            private int? idsolicitud;
            private int? idversion;
            private string obs;

            public ObsadjEditParam() {
            }

            public ObsadjEditParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ObsadjEditParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public string Obs {
                get { return obs; }
                set { this.obs = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ProdDuplicarParam {

            private int? idsolicitud;
            private int? idversion;
            private int? idproducto;
            private int? idpersonal;

            public ProdDuplicarParam() {
            }

            public ProdDuplicarParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ProdDuplicarParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public int? Idproducto {
                get { return idproducto; }
                set { this.idproducto = value; }
            }

            public int? Idpersonal {
                get { return idpersonal; }
                set { this.idpersonal = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ProdEditParam {

            private int? idsolicitud;
            private int? idversion;
            private int? idproducto;
            private string nombproducto;
            private string marcproducto;
            private int? idclasificacion;
            private string codiclas;
            private string codigrupo;
            private string composicion;
            private string aditivo;
            private string envase;
            private int? idpersonal;

            public ProdEditParam() {
            }

            public ProdEditParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ProdEditParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public int? Idproducto {
                get { return idproducto; }
                set { this.idproducto = value; }
            }

            public string Nombproducto {
                get { return nombproducto; }
                set { this.nombproducto = value; }
            }

            public string Marcproducto {
                get { return marcproducto; }
                set { this.marcproducto = value; }
            }

            public int? Idclasificacion {
                get { return idclasificacion; }
                set { this.idclasificacion = value; }
            }

            public string Codiclas {
                get { return codiclas; }
                set { this.codiclas = value; }
            }

            public string Codigrupo {
                get { return codigrupo; }
                set { this.codigrupo = value; }
            }

            public string Composicion {
                get { return composicion; }
                set { this.composicion = value; }
            }

            public string Aditivo {
                get { return aditivo; }
                set { this.aditivo = value; }
            }

            public string Envase {
                get { return envase; }
                set { this.envase = value; }
            }

            public int? Idpersonal {
                get { return idpersonal; }
                set { this.idpersonal = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ProdGetbyidParam {

            private int? idsolicitud;
            private int? idversion;
            private int? idproducto;
            private DbDataReader curForm;
            private DbDataReader curComponente;
            private DbDataReader curAditivo;
            private DbDataReader curEnvase;

            public ProdGetbyidParam() {
            }

            public ProdGetbyidParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ProdGetbyidParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public int? Idproducto {
                get { return idproducto; }
                set { this.idproducto = value; }
            }

            public DbDataReader CurForm {
                get { return curForm; }
                set { this.curForm = value; }
            }

            public DbDataReader CurComponente {
                get { return curComponente; }
                set { this.curComponente = value; }
            }

            public DbDataReader CurAditivo {
                get { return curAditivo; }
                set { this.curAditivo = value; }
            }

            public DbDataReader CurEnvase {
                get { return curEnvase; }
                set { this.curEnvase = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ProductoGetdetalleParam {

            private int? idproducto;
            private DbDataReader curComposicion;
            private DbDataReader curEnvase;
            private DbDataReader curAditivo;
            private DbDataReader curLote;//modificado por CESAR BOCANEGRA

            


            public ProductoGetdetalleParam() {
            }

            public ProductoGetdetalleParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ProductoGetdetalleParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idproducto {
                get { return idproducto; }
                set { this.idproducto = value; }
            }

            public DbDataReader CurComposicion {
                get { return curComposicion; }
                set { this.curComposicion = value; }
            }

            public DbDataReader CurEnvase {
                get { return curEnvase; }
                set { this.curEnvase = value; }
            }

            public DbDataReader CurAditivo {
                get { return curAditivo; }
                set { this.curAditivo = value; }
            }

            public DbDataReader CurLote
            {
                get { return curLote; }
                set { curLote = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ProductoUpdateParam {

            private int? idproducto;
            private int? idclasificacion;

            public ProductoUpdateParam() {
            }

            public ProductoUpdateParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ProductoUpdateParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idproducto {
                get { return idproducto; }
                set { this.idproducto = value; }
            }

            public int? Idclasificacion {
                get { return idclasificacion; }
                set { this.idclasificacion = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class ProductoUpdateEstadoParam {

            private string idproducto;
            private string estadoproducto;
            private string obsproducto;

            public ProductoUpdateEstadoParam() {
            }

            public ProductoUpdateEstadoParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public ProductoUpdateEstadoParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public string Idproducto {
                get { return idproducto; }
                set { this.idproducto = value; }
            }

            public string Estadoproducto {
                get { return estadoproducto; }
                set { this.estadoproducto = value; }
            }

            public string Obsproducto {
                get { return obsproducto; }
                set { this.obsproducto = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class SubsanaGetbyidParam {

            private int? idsubsanacion;
            private DbDataReader curSubsanacion;

            public SubsanaGetbyidParam() {
            }

            public SubsanaGetbyidParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public SubsanaGetbyidParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsubsanacion {
                get { return idsubsanacion; }
                set { this.idsubsanacion = value; }
            }

            public DbDataReader CurSubsanacion {
                get { return curSubsanacion; }
                set { this.curSubsanacion = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class SubsanaGetlistParam {

            private int? idsolicitud;
            private int? idversion;

            public SubsanaGetlistParam() {
            }

            public SubsanaGetlistParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public SubsanaGetlistParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class SubsanaGetmessageParam {

            private int? idsolicitud;
            private int? idversion;
            private string mensaje;

            public SubsanaGetmessageParam() {
            }

            public SubsanaGetmessageParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public SubsanaGetmessageParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public string Mensaje {
                get { return mensaje; }
                set { this.mensaje = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

        public class SubsanaUpdateParam {

            private int? idsubsanacion;
            private int? idsolicitud;
            private int? idversion;
            private string idactividad;
            private string rutaadj;
            private decimal? monttasa;
            private int? plazo;
            private string asunto;            
            private string descsubsanacion;

            public SubsanaUpdateParam() {
            }

            public SubsanaUpdateParam(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public SubsanaUpdateParam(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

            public int? Idsubsanacion {
                get { return idsubsanacion; }
                set { this.idsubsanacion = value; }
            }

            public int? Idsolicitud {
                get { return idsolicitud; }
                set { this.idsolicitud = value; }
            }

            public int? Idversion {
                get { return idversion; }
                set { this.idversion = value; }
            }

            public string Idactividad {
                get { return idactividad; }
                set { this.idactividad = value; }
            }

            public string Rutaadj {
                get { return rutaadj; }
                set { this.rutaadj = value; }
            }

            public decimal? Monttasa {
                get { return monttasa; }
                set { this.monttasa = value; }
            }

            public int? Plazo {
                get { return plazo; }
                set { this.plazo = value; }
            }

            public string Descsubsanacion {
                get { return descsubsanacion; }
                set { this.descsubsanacion = value; }
            }

            public string Asunto
            {
                get { return asunto; }
                set { asunto = value; }
            }

            public void setValuesFromMap(Dictionary<string, string> map) {
                ResourceManager.populateDtoFromMap(this, map);
            }

            public void setValuesFromMap(JSONObject json) {
                ResourceManager.populateDtoFromMap(this, json);
            }

        }

    }
}
